/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package fr.cinescope2014.modeles;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author formation
 */
@Entity
@Table(name = "appreciation")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Appreciation.findAll", query = "SELECT a FROM Appreciation a"),
    @NamedQuery(name = "Appreciation.findByIdAppreciation", query = "SELECT a FROM Appreciation a WHERE a.idAppreciation = :idAppreciation"),
    @NamedQuery(name = "Appreciation.findByEtoile", query = "SELECT a FROM Appreciation a WHERE a.etoile = :etoile"),
    @NamedQuery(name = "Appreciation.findByLibelleAppreciation", query = "SELECT a FROM Appreciation a WHERE a.libelleAppreciation = :libelleAppreciation")})
public class Appreciation implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "ID_APPRECIATION")
    private Integer idAppreciation;
    @Basic(optional = false)
    @Column(name = "ETOILE")
    private String etoile;
    @Basic(optional = false)
    @Column(name = "LIBELLE_APPRECIATION")
    private String libelleAppreciation;

    public Appreciation() {
    }

    public Appreciation(Integer idAppreciation) {
        this.idAppreciation = idAppreciation;
    }

    public Appreciation(Integer idAppreciation, String etoile, String libelleAppreciation) {
        this.idAppreciation = idAppreciation;
        this.etoile = etoile;
        this.libelleAppreciation = libelleAppreciation;
    }

    public Integer getIdAppreciation() {
        return idAppreciation;
    }

    public void setIdAppreciation(Integer idAppreciation) {
        this.idAppreciation = idAppreciation;
    }

    public String getEtoile() {
        return etoile;
    }

    public void setEtoile(String etoile) {
        this.etoile = etoile;
    }

    public String getLibelleAppreciation() {
        return libelleAppreciation;
    }

    public void setLibelleAppreciation(String libelleAppreciation) {
        this.libelleAppreciation = libelleAppreciation;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idAppreciation != null ? idAppreciation.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Appreciation)) {
            return false;
        }
        Appreciation other = (Appreciation) object;
        if ((this.idAppreciation == null && other.idAppreciation != null) || (this.idAppreciation != null && !this.idAppreciation.equals(other.idAppreciation))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "fr.cinescope2014.modeles.Appreciation[ idAppreciation=" + idAppreciation + " ]";
    }
    
}
